﻿using Abp.Domain.Entities;
using Batman.Jianbei.Forum.Core.Enums;
using System.ComponentModel.DataAnnotations;

namespace Batman.Jianbei.Forum.Core.Domains.Users
{
    public class WeixinUser : Entity<string>
    {
        [Required]
        [MaxLength(36)]
        public string AppId { get; set; }

        /// <summary>
        /// 公众号OpenId
        /// </summary>
        [Required]
        [MaxLength(36)]
        public string OpenId { get; set; }

        /// <summary>
        /// 关联用户ID
        /// </summary>
        [MaxLength(36)]
        public string UserId { get; set; }

        /// <summary>
        /// 微信昵称
        /// </summary>
        [MaxLength(40)]
        public string Nickname { get; set; }

        /// <summary>
        /// 微信头像
        /// </summary>
        [MaxLength(200)]
        public string Avatar { get; set; }

        [MaxLength(36)]
        public string UnionId { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public Sex? Sex { get; set; }

        [MaxLength(30)]
        public string Province { get; set; }

        [MaxLength(30)]
        public string City { get; set; }

        [MaxLength(30)]
        public string Country { get; set; }
    }
}
